import { BagType } from "js/typeDefine/typeDefine"
import { ItemModel } from "./itemModel"


export class BagModel {
    type: BagType//背包类型,枚举变量
    size: number//背包格数
    addSize: number//增加的背包格数
    items: ItemModel[]//背包中的物品们
    emptySize: number//剩余可用背包格数
    constructor(opts: any = {}) {
        this.type = opts.type || BagType.Bag
        this.size = opts.size || 0
        this.addSize = opts.addSize || 0
        this.items = opts.items || []
        this.emptySize = opts.emptySize || 0
    }
}